package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProjectContractDetailMapper;
import com.ruoyi.system.domain.ProjectContractDetail;
import com.ruoyi.system.service.IProjectContractDetailService;

/**
 * 项目合同内容Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-22
 */
@Service
public class ProjectContractDetailServiceImpl implements IProjectContractDetailService
{
    @Autowired
    private ProjectContractDetailMapper projectContractDetailMapper;

    /**
     * 查询项目合同内容
     *
     * @param detailId 项目合同内容主键
     * @return 项目合同内容
     */
    @Override
    public ProjectContractDetail selectProjectContractDetailByDetailId(Long detailId)
    {
        return projectContractDetailMapper.selectProjectContractDetailByDetailId(detailId);
    }

    /**
     * 查询项目合同内容列表
     *
     * @param projectContractDetail 项目合同内容
     * @return 项目合同内容
     */
    @Override
    public List<ProjectContractDetail> selectProjectContractDetailList(ProjectContractDetail projectContractDetail)
    {
        return projectContractDetailMapper.selectProjectContractDetailList(projectContractDetail);
    }

    /**
     * 新增项目合同内容
     *
     * @param projectContractDetail 项目合同内容
     * @return 结果
     */
    @Override
    public int insertProjectContractDetail(ProjectContractDetail projectContractDetail)
    {
        return projectContractDetailMapper.insertProjectContractDetail(projectContractDetail);
    }

    @Override
    public ProjectContractDetail selectProjectContractDetailByContractId(Long contractId) {
        return  projectContractDetailMapper.selectProjectContractDetailByContractId(contractId);
    }

    @Override
    public int deleteByContractIds(Long[] contractIds) {
        return projectContractDetailMapper.deleteByContractIds(contractIds);
    }

    /**
     * 修改项目合同内容
     *
     * @param projectContractDetail 项目合同内容
     * @return 结果
     */
    @Override
    public int updateProjectContractDetail(ProjectContractDetail projectContractDetail)
    {
        return projectContractDetailMapper.updateProjectContractDetail(projectContractDetail);
    }

    /**
     * 批量删除项目合同内容
     *
     * @param detailIds 需要删除的项目合同内容主键
     * @return 结果
     */
    @Override
    public int deleteProjectContractDetailByDetailIds(Long[] detailIds)
    {
        return projectContractDetailMapper.deleteProjectContractDetailByDetailIds(detailIds);
    }

    /**
     * 删除项目合同内容信息
     *
     * @param detailId 项目合同内容主键
     * @return 结果
     */
    @Override
    public int deleteProjectContractDetailByDetailId(Long detailId)
    {
        return projectContractDetailMapper.deleteProjectContractDetailByDetailId(detailId);
    }


}
